<?= isset($header) ? $header : '' ?>

<script src="/js/demand_pair.js"></script>


<div id="map-canvas"></div>

<div id="content">

    <form method="post" action="<?= site_url('/demand/data_entry_submit_add') ?>" >

        <input type="hidden" name="is_from_sql" value="not">

        <div style="overflow:visible;" class="form_style">

            <div class="title">
                <h5>需求輸入&nbsp;

                    <!--
                            <input type="button" onclick="demand_match_form();" value="模擬配對" class="input_background" name="analog_pairing_submit" id="analog_pairing_submit">
                    -->

                </h5>
            </div>
<style>
	#demand_title {
		background-color: honeydew;
		color: black;
	}
</style>
            <div id="userinfo">
                <!-- start -->
                <table>
                    <tbody>
                        <tr>
                            <th class="must_write">需求類型</th>
                            <td>

                                <input type="checkbox"  value="1" id="type_sell" name="type_sell" onclick="selected_sell()" checked>買賣
                                <input type="checkbox"  value="1" id="type_rent" name="type_rent" onclick="selected_rent()">租賃
                                <!--
                                <input type="checkbox" onclick="open_window(this);" value="1" id="type_consignment" name="type_consignment">代銷
                                -->
                            </td>
                            <th>物件用途</th>
                            <td >
                            	<input  type="type" id="object_usage" name="object_usage" class="full_select">                                
                            </td>

                            
                        </tr>


                        <tr>
                            <th class="color1">建物面積</th>
                            <td>
                                <input type="text" style="width:50px;height:20px;" id="building_area1" name="building_area1">
                                ~ <input type="text" style="width:50px;height:20px;" id="building_area2" name="building_area2">
                                坪
                            </td>

                            <th class="color1">車位數</th>
                            <td>
                                <input type="text" id="parking_number" style="width:24px;height:20px;" name="parking_number">&nbsp;個
                                <input type="checkbox" value="1" name="acceptable_mechanical">可接受機械
                            </td>


                            <th class="color1">土地面積</th>
                            <td>
                                <input type="text" style="width:50px;height:20px;" id="land_area1" name="land_area1">
                                ~ <input type="text" style="width:50px;height:20px;" id="land_area2" name="land_area2">
                                坪
                            </td>

                            <th>分區使用</th>
                            <td>
                            		<input type="text" id="partition_the222" name="partition_the" >
                            			
                                	
                            </td>

                        </tr>

                    </tbody>

                    <tr>
                        <th title="不含陽台.不含附屬" class="color1">室內面積</th>
                        <td>
                            <input type="text" style="width:50px;height:20px;" name="indoor_area1" id="indoor_area1">
                            ~ <input type="text" style="width:50px;height:20px;" name="indoor_area2" id="indoor_area2">
                            坪
                        </td>

                        <th style="width:75px;">樓地板高度</th>
                        <td>
                            <input type="text" style="width:104px;" id="floor_height" name="floor_height">M
                        </td>
                        
                        <th style="width:75px;">需求編號</th>
                        <td>
                            <input type="text" style="width:204px;" id="demand_serial" name="demand_serial" readonly="true"
                            value="<?php echo "demand".date("Ymdhis");?>"
                            >
                        </td>


                    </tr>
                    <tr>
                        <th class="color2">重點區域</th>
                        <td colspan="3">
                            <input type="text"  id="key_areas1" name="key_areas1" onclick="show_emphasis_area('key_areas1')" >
                            <input type="text"  id="key_areas2" name="key_areas2" onclick="show_emphasis_area('key_areas2')">
                        </td>
                        <th class="color2">指定大樓</th>
                        <td colspan="3">
                            <input type="text" id="specify_building1" name="specify_building1" onclick="show_building_name('specify_building1')">
                            <input type="text" id="specify_building2" name="specify_building2" onclick="show_building_name('specify_building2')">
                        </td>
                    </tr>



                        <tr>
                            <th class="color2" style="background-color: honeydew;color: black;">
                        <div >
                            <a onclick="show_surroundings();" class="additem">
                                <i id="surroundings_icon" class="icon-plus">&nbsp;&nbsp;</i>
                            </a>&nbsp;路段
                        </div>
                        </th>
                        <td colspan="3">
                            <input type="text"  id="sections1" name="sections1" onclick="show_address('sections1');">
                            <input type="text"  id="sections2" name="sections2" onclick="show_address('sections2');">
                        </td>
                        <th class="color2" id="demand_title" style="background-color: honeydew;color: black;" >物件案名
                        </th>
                        <td colspan="3">
                            <input type="text" id="object_name1" name="object_name1" onclick="show_object_case_name('object_name1');">
                            <input type="text" id="object_name2" name="object_name2" onclick="show_object_case_name('object_name2');">
                        </td>
                        </tr>


                        <tbody  id="surroundings" style="display: none;">
                            <tr>
                                <th class="color2"  style="background-color: honeydew;color: black;">捷運</th>
                                <td colspan="3">
                                    <select onchange="get_line(1);" class="full_select" style="width:100px;" name="mrt_line1" id="mrt_line1">
                                        <option value="">&nbsp;&nbsp;</option>
                                        <?
                                        foreach($mrt_line as $key=>$val){
                                        ?>
                                        <option value="<?= $val -> mrt_line_id ?>"><?= $val -> value ?></option>
                                        <?
										}
                                        ?>
                                    </select>
                                    起：
                                    <select class="full_select" style="width:100px;" id="mrt_start1"  name="mrt_start1">
                                        <option value="">&nbsp;&nbsp;&nbsp;&nbsp;</option>
                                    </select>
                                    迄：
                                    <select class="full_select" style="width:100px;" id="mrt_until1" name="mrt_until1">
                                        <option value="">&nbsp;&nbsp;&nbsp;&nbsp;</option>
                                    </select>
                                    <br>
                                    <select class="full_select" style="width:100px;" onchange="get_line(2);" name="mrt_line2" id="mrt_line2">
                                        <option value="">&nbsp;&nbsp;</option>
                                        <?
                                        foreach($mrt_line as $key=>$val){
                                        ?>
                                        <option value="<?= $val -> mrt_line_id ?>"><?= $val -> value ?></option>
                                        <?
										}
                                        ?>
                                    </select>
                                    起：
                                    <select class="full_select" style="width:100px;" id="mrt_start2" name="mrt_start2">
                                        <option value="">&nbsp;&nbsp;&nbsp;&nbsp;</option>
                                    </select>
                                    迄：
                                    <select class="full_select" style="width:100px;" id="mrt_until2" name="mrt_until2">
                                        <option value="">&nbsp;&nbsp;&nbsp;&nbsp;</option>
                                    </select>
                                </td>

                                <th class="color2" style="background-color: honeydew;color: black;">範圍<br>
                                    <input type="button" class="button" onclick="show_range_map();" value="設定" >
                                </th>

                                <td colspan="3">
                                    東
                                    <input type="text"  id="range_east" name="range_east">
                                    &nbsp;&nbsp;
                                    <input type="text"  id="range_north" name="range_north">
                                    <br>
                                    南
                                    <input type="text"  id="range_west" name="range_west">
                                    &nbsp;&nbsp;
                                    <input type="text"  id="range_south" name="range_south">
                                </td>
                            </tr>
                            <tr>
                                <th class="color2" style="background-color: honeydew;color: black;">公園</th>
                                <td colspan="3">
                                    <input type="text"  id="park1" name="park1" onclick="show_park('park1')">
                                    <input type="text"  id="park2" name="park2" onclick="show_park('park2')">
                                </td>
                                <th class="color2" style="background-color: honeydew;color: black;">學校</th>
                                <td colspan="3">
                                    <input type="text"  id="school1" name="school1" onclick="show_school('school1')">
                                    <input type="text"  id="school2" name="school2" onclick="show_school('school2')">
                                </td>
                            </tr>
                            <tr>
                                <th class="color2" style="background-color: honeydew;color: black;">商圈</th>
                                <td colspan="3">
                                    <input type="text"  id="circle1" name="circle1" onclick="show_circle('circle1');">
                                    <input type="text"  id="circle2" name="circle2" onclick="show_circle('circle2');">
                                </td>
                                <th class="color2" style="background-color: honeydew;color: black;">行政區</th>
                                <td colspan="3">
                                    <input type="text"  id="administrative_area1" name="administrative_area1" onclick="show_administrative_area('administrative_area1');">
                                    <input type="text"  id="administrative_area2" name="administrative_area2" onclick="show_administrative_area('administrative_area2');">
                                </td>
                            </tr>
                        </tbody>

                    <tbody><tr>
                            <th class="color3">總預算</th>
                            <td>
                                <input type="text" style="width:52px;" name="total_budget1" id="total_budget1">
                                ~<input type="text" style="width:52px;" name="total_budget2" id="total_budget2"> 萬
                            </td>
                            <th class="color3">每坪預算</th>
                            <td>
                                <input type="text" style="width:52px;" name="budget_per_ping1">~
                                <input type="text" style="width:52px;" name="budget_per_ping2"> 萬
                            </td>


                            <th>屋齡</th>
                            <td>
                                <input type="text" style="width:80px;" id="year_of_construction" name="year_of_construction">年以內
                            </td>
                            <th>物件案別</th>
                            <td>
                                <input type="checkbox" value="1" name="object_case_type[]" checked class="post"  >中古屋
                                <input type="checkbox" value="2" name="object_case_type[]" >預售
                                <input type="checkbox" value="3" name="object_case_type[]">標售
                            </td>
                        </tr>

                    <tr>
                        <th style="width:75px;">落地窗座向</th>
                        <td>
                        	<input type="text" id="windows" name="windows"  >                           
                        </td>
                        <th>該戶座向</th>
                        <td>
                        	<input type="text" id="facing_the_household" name="facing_the_household"  >                            
                        </td>
                        <th>大樓座向</th>
                        <td>                        	
                        	<input type="text" id="building_facing" name="building_facing"  >                           
                        </td>
                        <th>指定樓層</th>
                        <td>
                            <input type="text" style="width:34px;" id="designated_floors1" name="designated_floors1">
                            ~ <input type="text" style="width:34px;" id="designated_floors2" name="designated_floors2">樓
                            <input type="hidden" id="floors" name="floors" value="">
                            <input type="button" style="width:30px;" title="指定特定樓層" onclick="show_floors('floors')" value="..." class="input_background">
                        </td>
                    </tr>



                    <tr>
                        <th>物件型式</th>
                        <td>
                        	
                        		<input type="text" id="object_styles" name="object_styles" >
                            
                        </td>
                        <th>公共設施</th>
                        <td>
                        		<input type="text" id="public_facilities" name="public_facilities" >
                        		
                            	
                        </td>
                        <th>附屬配備</th>
                        <td>
	                        	<input type="text" id="accessories_with" name="accessories_with" class="full_select">                            
                        </td>
                        <th>管理</th>
                        <td>
                        	<input type="text" id="management" name="management" >
                            
                        </td>
                    </tr>
                    <tr>
                        <th>房數</th>
                        <td>
                            <input type="text" style="width:46px;" name="number_of_rooms1" id="number_of_rooms1">~<input type="text" style="width:46px;" name="number_of_rooms2" id="number_of_rooms2" >個
                        </td>
                        <th>廳數</th>
                        <td>
                            <input type="text" style="width:46px;" name="number_of_hall1" id="number_of_hall1">~<input type="text" style="width:46px;" name="number_of_hall2" id="number_of_hall2">個
                        </td>
                        <th>衛數</th>
                        <td>
                            <input type="text" style="width:46px;" name="number_of_toilet1" id="number_of_toilet1">~<input type="text" style="width:46px;" name="number_of_toilet2" id="number_of_toilet2">個
                        </td>
                        <th>套房數</th>
                        <td>
                            <input type="text" style="width:46px;" name="number_of_suite1" id="number_of_suite1">~<input type="text" style="width:46px;" name="number_of_suite2" id="number_of_suite2">個
                        </td>
                    </tr>

                    <tr>
                        <td style="margin:0px;padding:0px;" colspan="4">
                            <table>
                                <tbody><tr>
                                        <td style="margin:0px;padding:0px;border:0px;">

                                            <table style="margin:0px;padding:0px;display:;" id="selected_sell">
                                                <tbody>
                                                    <tr>
                                                        <th style="width:60px;" >投報率</th>
                                                        <td >
                                                            <input type="text" style="width:56px;" name="reported_rate1" id="reported_rate1">
                                                            ~ 
                                                            <input type="text" style="width:56px;" name="reported_rate2" id="reported_rate2">%
                                                        </td>
                                                        </tr>
                                                </tbody>
                                            </table>
                                        </td>
                                        <td style="margin:0px;padding:0px;border:0px;">
                                            <table style="display:none;margin:0px;padding:0px;" id="selected_rent">
                                                <tbody><tr>
                                                        <th style="width:90px;" >承租營業用途</th>
                                                        <td><input type="text" style="width:80%;" name="leasing_business_purposes" id="leasing_business_purposes"></td>
                                                    </tr></tbody></table></td>
                                    </tr>
                                </tbody>
                            </table>
                        </td>
                        
                        <th>面積單位</th>
                            <td>
                                <select id="area_unit" name="area_unit" class="full_select">
                                    <?
                                    foreach($area_unit as $key=>$val){
                                    ?>
                                    <option value="<?= $val -> area_unit_id ?>"><?= $val -> value ?></option>
                                    <?
									}
                                    ?>
                                </select>
                            </td>


                            <th>幣別</th>
                            <td>
                                <select id="currency" name="currency" class="full_select">
                                    <?
                                    foreach($currency as $key=>$val){
                                    ?>
                                    <option value="<?= $val -> currency_id ?>"><?= $val -> value ?></option>
                                    <?
									}
                                    ?>
                                </select>
                            </td>
                    </tr>


                <input type="hidden" id="client_id" name="client_id" value="false" >
                <input type="hidden" id="client_contact_id" name="client_contact_id" value="false" >
                <input type="hidden" id="ref_client_verify_code" name="ref_client_verify_code" value="false" >



                        <tr>
                            <th  style="background-color: paleturquoise;"  class="must_write">姓名</th>
                            <td>
                                <input type="text" info="姓名" class="check" id="name" name="client[name]">
                            </td>
                            <th style="background-color: paleturquoise;" >手機</th>
                            <td id="demand_t">
                                <input type="text" style="width:130px;" value="" id="mobile" name="client[mobile]"></td>
                            <th style="background-color: paleturquoise;" >住家電話</th>
                            <td>
                                <input type="text" style="width:130px;" value="" id="home_phone" name="client[home_phone]">
                            </td>
                            <th style="background-color: paleturquoise;" >公司電話</th>
                            <td colspan="3">
                                <input type="text" style="width:130px;" id="company_phone" name="client[company_phone]">
                            </td>
                        </tr>

                        <tr>
                            <th style="background-color: paleturquoise;" >住家地址</th>
                            <td colspan="3">
                                <input type="text" id="home_address" name="client[home_address]" style="width:80%;" >
                            </td>
                            <th style="background-color: paleturquoise;" >大樓名稱</th>
                            <td colspan="3">
                                <input type="text" id="home_building_name" name="client[home_building_name]" style="width:70%;">
                            </td>
                        </tr>

                        <tr>
                            <th style="background-color: paleturquoise;" >公司地址</th>
                            <td colspan="3">
                                <input type="text" id="company_address" name="client[company_address]" style="width:80%;" >
                            </td>
                            <th style="background-color: paleturquoise;" >公司名稱</th>
                            <td colspan="3">
                                <input type="text" id="company_name" name="client[company_name]" style="width:70%;">
                            </td>
                        </tr>

                        <tr>
                            <th style="background-color: paleturquoise;" >Email</th>
                            <td colspan="3">
                                <input type="text" id="email"  name="client[email]" style="width:60%;" onblur="checkemail('email')"><input type="button" onclick="open_email('email');" value="開啟mail" class="input_background">
                            </td>
                            <th style="background-color: paleturquoise;" >聯絡人</th>
                            <td>
                                <input type="text" id="contact_name" name="contact_name" style="width:130px;">
                            </td>
                            <th style="background-color: paleturquoise;" >聯絡人電話</th>
                            <td>
                                <input type="text" id="contact_phone" name="contact_home_phone" id="contact_phone" style="width:130px;">
                            </td>
                        </tr>

                    <tr>
                        <th valign="middle">備註</th>
                        <td colspan="7">
                            <textarea name="remark" id="remark" style="width: 1000px; height: 95px;"></textarea>
                        </td>
                    </tr>

                    <tr>
                        <th>客戶來源</th>
                        <td>
                        		<input type="text" name="customer_source" id="customer_source" class="full_select">
                        		
                            	
                        </td>



                        <th>需求等級</th>
                        <td>
                            <select name="required_level" id="required_level" class="full_select">
                                <option value="">&nbsp;</option>
                                <?
                                foreach($required_level as $key=>$val){
                                ?>
                                <option value="<?= $val -> required_level_id ?>"><?= $val -> value ?></option>
                                <?
								}
                                ?>
                            </select>
                        </td>

                        <th>狀態</th>
                        <td>
                            <select name="status" id="status" class="full_select">
                                <option value="Y">有效</option>
                                <option value="N">無效</option>
                            </select>
                        </td>

                        <th>無效說明</th>
                        <td>
                            <input type="text" name="invalid_description" id="invalid_description">
                        </td>

                    </tr>

<!-------------------------------------------------------------------------------------------------------------------->
 <tr>
                            <th>機密等級</th>
                            <td>
                                <select name="sercet_level" id="sercet_level"  >	
									<option value="1" >普通</option>						
									<option value="3" >極機密</option>
									<option value="2" >機密</option>														
								</select>
                            </td>

                            <th>是否公開</th>
                            <td>
                                
                                <select name="is_public" id="is_public"  >														
									<option value="1" >公開</option>
									<option value="2" >不公開</option>							
								</select>	    		
                            </td>

                            <th>重要性</th>
                            <td>
                            	<select name="important" id="important" >
									<option value="1"  >普通</option>								
									<option value="3"  >極重要</option>
									<option value="2"  >重要</option>												
								</select>
                            </td>

                            <th style="display:none;">遮蔽欄位</th>
                            <td style="display:none;">
                               <select name="is_see" id="is_see" >														
									<option value="2" >遮蔽</option>
									<option value="1" >不遮蔽</option>							
								</select>
                            </td>
                        </tr>
<!-------------------------------------------------------------------------------------------------------------------->

                    <tr>
                        <?php

						$this -> load -> model("users_model");
						$this -> load -> library('session');
						$c_ss = $this -> session -> all_userdata();
						$_head_info = $this -> users_model -> get_user_by_user('劉陳傳');
						//接待人   ,   經紀人
						$html["front_man"] = $c_ss["users_id"];
						$html["broker"] = $c_ss["users_id"];
						//主管
						$html["head"] = $_head_info -> result();
						$CI = &get_instance();
						$user_id = $CI -> login_lib -> users_id();
                            ?>
                        <th>接待人</th>
                        <td>
                            <input type="hidden" value="<?= $user_id ?>" name="front_man" id="front_man" style="width:130px;">
                            <?php

                            echo $this->login_lib->users_name() ?>
                        </td>
                        <th>主管</th>
                        <td>
                            <?php
							echo $html["head"][0] -> name;
                            ?>
                            <input type="hidden" name="head" id="head" value="<?=$html["head"][0] -> users_id ?>">
                        </td>
                        <th>原經紀人</th>
                        <td>
                            <input type="hidden" name="original_broker" id="original_broker" value="">

                        </td>
                        <th>經紀人</th>
                        <td>
                            <input type="hidden" name="broker" id="broker" value="<?=$c_ss["users_id"]; ?>" >
                            <?=$c_ss["user"]; ?>
                        </td>
                    </tr>
                    <tr>
                        <td colspan="6"></td>
                        <td class="last_save">
                        		<input type="button"  value="存檔" class="input_background" id="demand_submit">
                        </td>
                        <td  class="last_save">
                            <input type="button" value="重置" class="input_background" id="reset">
                        </td>
                    </tr>
                    </tbody>
                </table>

            </div>
        </div>



<?php
	$this -> load -> view("showbox/address");
?>








        <div id="administrative_area_select" style="display: none;">
            <div id="city_div"  style="float:left;padding:10px">
                <h3>縣市</h3>
                <select onchange="administrative_area_city_choose();" style="width:102px;" size="30" id="administrative_city">
                    <option value="">請選擇</option>
                    <?
                    foreach($address_city as $key=>$val){
                    ?>
                    <option value="<?= $val -> id ?>"><?= $val -> name ?></option>
                    <?
					}
                    ?>
                </select>
            </div>
            <div id="area_div"  style="float:left;padding:10px;width:102px;">
                <h3>區域</h3>
                <select onchange="administrative_area_choose();" style="width:102px;" size="30" id="administrative_country">
                    <option value="">請選擇</option>
                </select>
            </div>
            <div style="clear: both;"></div>
            <div id="addr_div" style="padding:10px">
                <input type="text" value="" id="administrative_area" >
            </div>

        </div>

        <div id="part_select" style="display: none;">
            <div id="part_city_div"  style="float:left;padding:10px">
                <h3>縣市</h3>
                <select onchange="part_city_choose();" style="width:102px;" size="30" id="part_city">
                    <option value="">請選擇</option>
                    <?
                    foreach($address_city as $key=>$val){
                    ?>
                    <option value="<?= $val -> id ?>"><?= $val -> name ?></option>
                    <?
					}
                    ?>
                </select>
            </div>
            <div id="part_country_div"  style="float:left;padding:10px;width:102px;">
                <h3>區域</h3>
                <select onchange="part_country_choose();" style="width:102px;" size="30" id="part_country">
                    <option value="">請選擇</option>
                    <?
                    foreach($address_county as $key=>$val){
                    ?>
                    <option value="<?= $val -> id ?>" ><?= $val -> name ?></option>
                    <?
					}
                    ?>
                </select>
            </div>
            <div id="part_div"  style="float:left;padding:10px;width:102px;">
                <h3>公園</h3>
                <select onchange="part_choose();" style="width:102px;" size="30" id="part">
                    <option value="">請選擇</option>
                </select>
            </div>
            <div style="clear: both;"></div>
            <div id="p_div" style="padding:10px">
                <input type="text" value="" id="part_value" >
            </div>

        </div>


        <div id="school_select" style="display: none;">
            <div id="school_city_div"  style="float:left;padding:10px">
                <h3>縣市</h3>
                <select onchange="school_city_choose();" style="width:102px;" size="30" id="school_city">
                    <option value="">請選擇</option>
                    <?
                    foreach($address_city as $key=>$val){
                    ?>
                    <option value="<?= $val -> id ?>"><?= $val -> name ?></option>
                    <?
					}
                    ?>
                </select>
            </div>
            <div id="school_class_div"  style="float:left;padding:10px;width:102px;">
                <h3>學校類別</h3>
                <select onchange="school_class_choose();" style="width:102px;" size="30" id="school_class">
                    <option value="">請選擇</option>
                    <?
                    foreach($school_class as $key=>$val){
                    ?>
                    <option value="<?= $val -> school_class_id ?>" ><?= $val -> value ?></option>
                    <?
					}
                    ?>
                </select>
            </div>
            <div id="school_div"  style="float:left;padding:10px;width:180px;">
                <h3>學校</h3>
                <select onchange="school_choose();" style="width:180px;" size="30" id="school">
                    <option value="" selected>請選擇</option>
                </select>
            </div>
            <div style="clear: both;"></div>
            <div id="s_div" style="padding:10px">
                <input type="text" value="" id="school_value" >
            </div>

        </div>

        <div id="emphasis_area_select" style="display: none;"  class="form_style">
            <table class="windows_choose">
                <thead>
                    <tr>
                        <th>選擇</th>
                        <th>重點區域</th>
                        <th>說明</th>

                    </tr>
                </thead>
                <tbody>
                    <?
                    foreach($emphasis_area as $key=>$val){
                    ?>
                    <tr id="t_<?= $val -> emphasis_area_id ?>">
                        <td><input type="radio" value="<?= $val -> value ?>" name="emphasis_area_value" id="emphasis_area_value"></td>
                        <td><?= $val -> value ?></td>
                        <td><?= $val -> explanation ?></td>
                    </tr>
                    <?
					}
                    ?>
                </tbody>
            </table>
        </div>
        <div id="building_name_select" style="display: none;"  class="form_style">
            <table class="windows_choose">
                <thead>
                    <tr>
                        <th>選擇</th>
                        <th>名稱</th>
                        <th>說明</th>

                    </tr>
                </thead>
                <tbody>
                    <?
                    foreach($building_name as $key=>$val){
                    ?>
                    <tr id="t_<?= $val -> building_name_id ?>">
                        <td><input type="radio" value="<?= $val -> value ?>" name="building_name_value" id="building_name_value"></td>
                        <td><?= $val -> value ?></td>
                        <td><?= $val -> explanation ?></td>
                    </tr>
                    <?
					}
                    ?>
                </tbody>
            </table>
        </div>
        <div id="object_case_name_select" style="display: none;"  class="form_style">
            <table class="windows_choose">
                <thead>
                    <tr>
                        <th>選擇</th>
                        <th>物件編號</th>
                        <th>案名</th>

                    </tr>
                </thead>
                <tbody>
                    <?
                    foreach($object_case_name->result() as $val){
                    ?>
                    <tr id="t_<?= $key ?>">
                        <td><input type="radio" value="<?= $val -> case_name ?>" name="object_case_name_value" id="object_case_name_value"></td>
                        <td><?= $val -> object_no ?></td>
                        <td><?= $val -> case_name ?></td>
                    </tr>
                    <?
					}
                    ?>
                </tbody>
            </table>
        </div>
        <div id="circle_select" style="display: none;"  class="form_style">
            <div id="circle_city_div"  style="float:left;padding:10px">
                <h3>縣市</h3>
                <select onchange="circle_city_choose();" style="width:102px;" size="30" id="circle_city">
                    <option value="">請選擇</option>
                    <?
                    foreach($address_city as $key=>$val){
                    ?>
                    <option value="<?= $val -> id ?>"><?= $val -> name ?></option>
                    <?
					}
                    ?>
                </select>
            </div>
            <div id="circle_country_div"  style="float:left;padding:10px;width:102px;">
                <h3>區域</h3>
                <select onchange="circle_country_choose();" style="width:102px;" size="30" id="circle_country">
                    <option value="">請選擇</option>
                    <?
                    foreach($address_county as $key=>$val){
                    ?>
                    <option value="<?= $val -> id ?>" ><?= $val -> name ?></option>
                    <?
					}
                    ?>
                </select>
            </div>
            <div id="circle_div"  style="float:left;padding:10px;width:102px;">
                <h3>商圈</h3>
                <select onchange="circle_choose();" style="width:102px;" size="30" id="circle">
                    <option value="">請選擇</option>
                </select>
            </div>
            <div style="clear: both;"></div>
            <div id="p_div" style="padding:10px">
                <input type="text" value="" id="circle_value" style="width:300px;">
            </div>
        </div>
        <div id="floors_select" style="display: none;"  class="form_style">
            <div id="floors_div" style="padding:10px">
                <input type="text" value="" id="floors_value" name="floors_value" style="width:250px;">
            </div>
        </div>
</div>
<div id="range_map_select" style="display: none;" >
    <div id="mycontrol" style="z-index: 0; position: absolute; top: 0px; left: 346px;"><div id="start">開始選取</div><div id="end">結束選取</div></div>
    <div id="map_canvas" style="width:620px;height:600px"></div>
    <div>
        (東北)纬度：<input type="text" id="_latitude1">经度：<input type="text" id="_longitude1"><br>
        (西南)纬度：<input type="text" id="_latitude2">经度：<input type="text" id="_longitude2"><br>
        <span style="color:red;">選取過程中，點擊所選區域以確定基本選區,選區大小可修改，選區可拖動(注：默認顯示台北市)</span>
    </div>
</form>
</div>
<?=
isset($footer) ? $footer : ''
?>
